﻿namespace GanFeng.Forest.WebApi.Objects
{
    /// <summary>
    /// 配方参数明细排序器
    /// </summary>
    public class MesRecipeArgsDetailSerialNumberSortor : IComparer<MesRecipeArgsDetail>
    {
        /// <summary>
        /// 创建一个新的配方参数明细排序器
        /// </summary>
        /// <param name="x"></param>
        /// <param name="y"></param>
        /// <returns></returns>
        public int Compare(MesRecipeArgsDetail? x, MesRecipeArgsDetail? y)
        {
            if(x == null || y == null)
                return 0;

            return x.StepSerialNumber.CompareTo(y.StepSerialNumber);
        }
    }
}
